package thread;

public class MyThread extends Thread{
    @Override
    public void run() {
        //run方法就是线程入口方法
        while (true) {
            System.out.println("hello thread");
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
